<template>
  <div class="user-swiper">
    <div class="swiper-wrapper">
      <div class="swiper-slide white-space" v-for="(item, index) in noticeData" :key="index"><span class="color-blue">【公告】</span> {{item.content}}</div>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
      noticeData:[
        {content:"我是公告"}
      ]
    };
  },
  methods: {
    init(){
      var mySwiper = new Swiper('.user-swiper', {
        autoplay:{
          delay:5000
        },
        loop:true,
        direction : 'vertical',
      })
    }
  },
  created() {
    this.$nextTick(()=>{
      this.init()
    })
  }
};
</script>
<style lang="scss" scoped>
.user-swiper {
  font-size: 12px;
  width: 100%;

  .swiper-slide{
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
  }
}
</style>